package com.rchat.pocmini.activity.forgetpwd;

import com.aso.common.http.delegate.HttpCallbackImpl;
import com.rchat.pocmini.common.mvp.BaseModel;
import com.rchat.pocmini.common.mvp.BasePresenter;
import com.rchat.pocmini.common.mvp.BaseView;

/**
 * Created by ljd on 2017/7/28.
 */

public interface ForgetPwdContract {

    interface View extends BaseView {
        /**
         * 开始获取验证码
         */
        void getVerificationCodeBegin();

        /**
         * 设置注册进度条的可见状态
         *
         * @param visibility 可见状态
         */
        void setProcessBarVisibility(int visibility);

        /**
         * 结束当前activity
         */
        void finishSelf();
    }

    abstract class Presenter extends BasePresenter<ForgetPwdContract.View, ForgetPwdContract.Model> {
        /**
         * 获取验证码
         *
         * @param pwd        新密码
         * @param pwdConfirm 确认新密码
         * @param phone      手机
         */
        abstract void getVerificationCode(String pwd, String pwdConfirm, String phone);


        /**
         * 充值密码
         *
         * @param verificationCode 验证码
         * @param phone            手机
         * @param pwd              新密码
         * @param pwdConfirm       确认新密码
         */
        abstract void resetPwd(String verificationCode, String phone, String pwd, String pwdConfirm);
    }

    interface Model extends BaseModel {
        /**
         * 获取验证码
         *
         * @param phone    电话号码
         * @param callback 请求回调
         */
        void getVerificationCode(String phone, HttpCallbackImpl callback);

        /**
         * 重置密码
         *
         * @param verificationCode 验证码
         * @param phone            手机
         * @param pwd              新密码
         * @param callback         请求回调
         */

        void resetPwd(String verificationCode, String phone, String pwd, HttpCallbackImpl callback);
    }

}
